package com.api.user.service;
import com.api.core.config.AuthUser;
import com.api.user.model.Team;
import com.api.core.service.Service;
import com.api.core.response.Result;
import com.api.user.vo.TeamVo;

import java.util.List;
import java.util.Map;

/**
 * Created by wanghuiwen on 2021/03/26.
 */
public interface TeamService extends Service<Team> {
   Result list(Map<String, Object> params, String order, Integer page, Integer size);
   Result achievement(Long teamId);

   Result add(Team team);


    /**
     * 获取战队参加的赛事
     * @param params
     * @param page
     * @param size
     * @return
     */
    Result tournaments(Map<String, Object> params, Integer page, Integer size);

    Result userList(Map<String, Object> params, AuthUser authUser);

    Map<Long, TeamVo> getIdVoMap(List<Long> teamIds);

    Map<Long, List<Integer>> batchCountRank(List<Long> teamIds);

    Result transfer(Long toUser, Long teamId, Long id);

    /**
     * transfer player 把队员移动到其他队伍
     * @param teamId 原队伍Id
     * @param userId 要变更的队员ID
     * @param toTeamId 要加入的队伍ID
     * @return
     */
    Result moveto(Long teamId, Long userId, Long toTeamId);
}
